package com.tungse.study.file;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @Description: 实现可以接收客户端任意类型文件， 并将其保存到服务端磁盘中
 * @Author: Tungse
 */
public class ServerFile {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(9999);
        while (true) {
            Socket socket = serverSocket.accept();
            //将socket交给一个独立的线程进行处理
            new ServerReaderThread(socket).start();

        }

    }

}
